<template>
  <van-tabbar v-model="active" active-color="#3CB371">
    <van-tabbar-item icon="photo-o" to="/map">地图</van-tabbar-item>
    <!--<van-tabbar-item icon="wap-home-o" to="/home">首页</van-tabbar-item>-->
    <van-tabbar-item icon="chat-o" to="/message">消息</van-tabbar-item>
    <van-tabbar-item icon="contact-o" to="/user">我</van-tabbar-item>
  </van-tabbar>
</template>

<script setup>
import {ref} from "vue"
import emitter from '@/utils/bus.js'

const active = ref(0)
emitter.on('updateActive',(data)=>{
  active.value = data
})

</script>

<style scoped lang="less">
.van-tabbar--fixed {
  width: 100vw;
}
</style>